package com.example.onlineeducation.data.entity

import com.yc.jetpacklib.extension.ycIsEmpty
import com.yc.jetpacklib.extension.ycToNoEmpty

/**
 * SimpleDes:
 * Creator: Sindi
 * Date: 2022-04-19
 * UseDes:
 */
data class StudyPlanEntity(
    val groupId: String?,
    val imgUrl: String?,//专题图片
    val groupName: String,//专题分组名称
    val startTime: String?,//开始时间
    val endTime: String?,//结束时间
    val topicStudyStatus: String?,//专题学习进度
) {
    fun getTimeRange(): String {
        return if (startTime.ycIsEmpty() && endTime.ycIsEmpty()) {
            "-"
        } else {
            "${startTime.ycToNoEmpty()}~${endTime.ycToNoEmpty()}"
        }
    }


}
